import React, { Component } from 'react'
import {
  Text,
  TextInput,
  View,
} from 'react-native'
import RootContainer from './RootContainer'
import SplashScreen from 'react-native-splash-screen'
import { withSafeArea } from 'react-native-safe-area'
const SafeAreaView = withSafeArea(View, 'margin', 'bottom')


TextInput.defaultProps = Object.assign({}, TextInput.defaultProps, {
  allowFontScaling: false,
  padding: 0,
});
Text.defaultProps = Object.assign({}, Text.defaultProps, {
  allowFontScaling: false
});
/**
 * Provides an entry point into our application.  Both index.ios.js and index.android.js
 * call this component first.
 *
 * We create our Redux store here, put it into a provider and then bring in our
 * RootContainer.
 *
 * We separate like this to play nice with React Native's hot reloading.
 */
class App extends Component {

  constructor(props) {
    super(props)
  }

  componentDidMount = () => {
    //隐藏启动页
    // setTimeout(() => {
    //   SplashScreen.hide()
    // }, 3000)
  }

  render() {
    return (
      <SafeAreaView style={{ flex: 1 }}>
        <RootContainer />
      </SafeAreaView>
    )
  }
}

export default App
